from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class InformationBox(models.Model):
    title = models.CharField(max_length=100,default="无标题")
    #信息标题
    TxUser = models.CharField(max_length=100,default="匿名用户")
    # 信息发出者
    RxUser = models.CharField(max_length=100)
    # 信息接收者
    content = models.TextField(default="无内容")
    #图像路径
    url = models.TextField(default="#")
    #文章内容
    published_date = models.DateTimeField(auto_now=True)
    #提交时间

class GraphService(models.Model):
    user = models.ForeignKey(User,on_delete=models.CASCADE,related_name='AnalyseData')
    #外键，连接使用者
    name = models.CharField(max_length=100)
    #患者名
    radar_data = models.JSONField(default=list)
    radar_labels = models.JSONField(default=list)
    #雷达图数据
    pie_data = models.JSONField(default=list)
    pie_labels = models.JSONField(default=list)
    #饼图数据
